/**
 * Copyright (c) 2011-9-23 WKM and/or its affiliates. 
 * Use is subject to license terms.
 * All rights reserved.
 */
package org.wkm.task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.wkm.task.factory.SchedulerFactoryUtil;
import org.wkm.task.file.DataReader;
import org.wkm.task.job.Heartbeat;

/**
 * @author WKM Modification history 1.WKM -2011-9-23-Create File
 */
public class Start extends Thread {
	
	private static Logger logger = LoggerFactory.getLogger(Start.class);
	private DataReader reader = DataReader.getInstance();

	public void run() {
		this.setName("Thread-Monitor:" + getClass().getName());
		logger.info("启动监控中心...");
		
		SchedulerFactoryUtil sfu = new SchedulerFactoryUtil();
		sfu.addJob(Heartbeat.class, "*/10 * * * * ?");
		sfu.addJob(ShowFrame.class, reader.getProperty("showframe.cron.setting"));
		logger.info(reader.getProperty("showframe.cron.setting"));
		sfu.bootup();
	}
}
